
package it.csttech.date;

import java.util.Date;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes(value = {
	@Type(value = ComplexObjectTwoList.class),
	@Type(value = ComplexObjectTwoMap.class)
})
public class ComplexObject {

	private Date date;
	private Float fl;
	private Map<String, Float> map;
	private List<Float> list;

	public ComplexObject(
		Date date, Float fl, Map<String, Float> map, List<Float> list) {

		this.date = date;
		this.fl = fl;
		this.map = map;
		this.list = list;
	}

	public ComplexObject() {

	}

	public List<Float> getList() {

		return list;
	}

	public void setList(List<Float> list) {

		this.list = list;
	}

	public Date getDate() {

		return date;
	}

	public void setDate(Date date) {

		this.date = date;
	}

	public Float getFl() {

		return fl;
	}

	public void setFl(Float fl) {

		this.fl = fl;
	}

	public Map<String, Float> getMap() {

		return map;
	}

	public void setMap(Map<String, Float> map) {

		this.map = map;
	}

	@Override
	public String toString() {

		StringBuilder builder = new StringBuilder();
		builder.append("ComplexObject [date=");
		builder.append(date);
		builder.append(", fl=");
		builder.append(fl);
		builder.append(", map=");
		builder.append(map);
		builder.append("]");
		return builder.toString();
	}

}
